#pragma once

#include <mysql.h>
// CJLDBProvider command target

class CJLDBProvider : public CObject
{
public:
	CJLDBProvider();
	virtual ~CJLDBProvider();

	BOOL OpenDatabase();
	void CloseDatabase();

	int ExecteNonSQL( const CString& strSQLCommand );

	MYSQL_RES* ExecuteSQL(const CString& strSQLCommand ); 

	MYSQL* GetMySQLConn() const { return m_pMySQLConn; }
	void SetMySQLConn(MYSQL* val) { m_pMySQLConn = val; }

private:
	MYSQL* m_pMySQLConn; 
    BOOL    m_bConnectIsOpenned;

    BOOL ConnectIsOpenned() const { return m_bConnectIsOpenned; }
    void SetConnectIsOpenned(BOOL val) { m_bConnectIsOpenned = val; }
};


